package com.appwoo.txtws.service;

import android.app.ActivityManager;
import android.app.ActivityManager.RunningTaskInfo;
import android.app.Service;
import android.content.ComponentName;
import android.content.Intent;
import android.os.IBinder;
import com.appwoo.txtws.activity.MainActivity;
import java.util.List;

public class RuningOurSoft extends Service
{
  public IBinder onBind(Intent paramIntent)
  {
    return null;
  }

  public void onCreate()
  {
    new CheckRunner().run();
    super.onCreate();
  }

  public int onStartCommand(Intent paramIntent, int paramInt1, int paramInt2)
  {
    return super.onStartCommand(paramIntent, paramInt1, paramInt2);
  }

  public class CheckRunner
    implements Runnable
  {
    private long count = 0L;

    public CheckRunner()
    {
    }

    public void run()
    {
      try
      {
        ActivityManager localActivityManager = (ActivityManager)RuningOurSoft.this.getSystemService("activity");
        ComponentName localComponentName = null;
        if (localActivityManager != null)
          localComponentName = ((ActivityManager.RunningTaskInfo)localActivityManager.getRunningTasks(2).get(0)).topActivity;
        if (!localComponentName.getPackageName().equals("com.appwoo.txtws.activity"))
        {
          Intent localIntent = new Intent(RuningOurSoft.this, MainActivity.class);
          localIntent.setFlags(268435456);
          RuningOurSoft.this.startActivity(localIntent);
        }
        return;
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
      }
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.service.RuningOurSoft
 * JD-Core Version:    0.6.2
 */